import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import Layout from '@/layout'

// 公共路由
export const constantRoutes =[
    {
        path: '/login',//
        component: () => import('@/views/login/index'),
        hidden: true
    },
    {
        path: '',//
        component: () => import('@/views/mian/index.vue'),
        hidden: true
    },
]


const router = createRouter({
    history: createWebHashHistory(),
    routes: constantRoutes, 
    // scrollBehavior(to, from, savedPosition) {
    //   if (savedPosition) {
    //     return savedPosition
    //   } else {
    //     return { top: 0 }
    //   }
    // },
  });
  
  export default router;